package com.zqh.myfmmall.clients;

import com.zqh.myfmmall.fallback.UserQueryClientFallback;
import com.zqh.myfmmall.rowbeans.entity.Users;
import com.zqh.myfmmall.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Description :
 * @Author :kono淇杭哒、
 * @Create 2022-02-18 1:34
 */
@FeignClient(value = "user-query",fallbackFactory = UserQueryClientFallback.class)
public interface UserQueryClient{
    @PostMapping("user/query")
    Result queryUser(@RequestBody Users user);


    @GetMapping("user/retrieveUserBasicInfo/{userId}")
    Result retrieveUserBasicInfo(@PathVariable("userId") String userId);

    @PostMapping("user/retrieveBatchUserBasicInfo")
    Result retrieveBatchUserBasicInfo(@RequestBody List<String> ids);
}
